package com.sumainfor.zuul.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.zuul.service.impl.Feign.FeignUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能描述:
 *
 * @Auther: zhlu
 * @Date: 2019/5/30 13:47
 * @Description:
 */
@RestController
@RequestMapping("/sys/AllUser")
public class AllUserController {

    @Autowired
    FeignUserService FeignUserService;

    /**
     * 功能描述: 
     * 获取所有用户的编号和名称
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/30 13:49
     */
    @ResponseBody
    @RequestMapping(value = "/getAllUserIdAndName",method = RequestMethod.GET)
    public JsonResult getAllUserIdAndName(){
        JsonResult result=new JsonResult();
        return result.put(FeignUserService.getAllUserIdAndName());
    }

}
